package com.pandora.loan.home.enums;

/**
 * @author developer
 */
public enum ServiceTypesEnum {
    /**
     * OP
     */
    OP("OP","OP"),
    /**
     * TR
     */
    TR("TR","TR"),
    /**
     * EC
     */
    EC("EC","EC"),
    /**
     * OP
     */
    WM("WM","WM"),
    /**
     * HF
     */
    HF("HF","HF"),
    /**
     * DR
     */
    DR("DR","DR"),
    /**
     * BF
     */
    BF("BF","BF");

    private String key;
    private String value;

    private ServiceTypesEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static ServiceTypesEnum getServiceType(String key) {
        for (ServiceTypesEnum serviceType : values()) {
            if (key.equals(serviceType.getKey())) {
                return serviceType;
            }
        }
        return null;
    }
}
